package org.dromara.cms.domain.bo;

import org.dromara.cms.domain.CmsArticleCategory;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * CMS文章分类业务对象 cms_article_category
 *
 * @author Spring
 * @date 2024-12-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = CmsArticleCategory.class, reverseConvertGenerate = false)
public class CmsArticleCategoryBo extends BaseEntity {

    /**
     * 分类ID
     */
    @NotNull(message = "分类ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 父分类ID
     */
    @NotNull(message = "父分类ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long parentId;

    /**
     * 分类名称
     */
    @NotBlank(message = "分类名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * URL别名
     */
    @NotBlank(message = "URL别名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String slug;


    /**
     * 分类描述
     */
    @NotBlank(message = "分类描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String description;

    /**
     * 关键词
     */
    @NotBlank(message = "关键词不能为空", groups = { AddGroup.class, EditGroup.class })
    private String keywords;

    /**
     * 显示顺序
     */
    @NotNull(message = "显示顺序不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sort;

    /**
     * 模板
     */
    @NotBlank(message = "模板不能为空", groups = { AddGroup.class, EditGroup.class })
    private String template;

    /**
     * 是否显示(0隐藏 1显示)
     */
    @NotNull(message = "是否显示(0隐藏 1显示)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String isShow;

    /**
     * 状态(0正常 1停用)
     */
    @NotBlank(message = "状态(0正常 1停用)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 备注
     */
    private String remark;


}
